Repository navigation
feat(dflash): expose effective runtime state - #3003
joshuaswarren wants to merge 4 commits into
Conversation
4323d58 to
bf83461
Compare
|
Rebased onto Change: the fallback-reason path regex excluded whitespace, so a home path with a space ( Tests: added three regression cases (spaced path, quoted path, ratio non-path). No other changes. Ready for review. |
50c6b05 to
a229fe5
Compare
a229fe5 to
a6cd815
Compare
1e1f6cc to
633ff52
Compare
|
After rebasing onto current main, this PR keeps upstream's current behaviour in batched-drafter mode and for decision models: it only reports the effective engine state and does not change which engine runs or when a DFlash load declines. Extending the reported status to those two cases can be a follow-up if you want it. |
633ff52 to
4756895
Compare
|
Rebased onto current |
|
CI on the last rebase ( I cannot re-run the job (it needs admin rights on the repo). A maintainer re-run of the failed job should pass if the timeout is a runner-load flake. |
…sons The path regex excluded whitespace, so /Users/Joshua Warren/... leaked unredacted into the API status response. Match path segments up to delimiters instead of whitespace, and add regression tests for spaced paths, quoted paths, and the a/b ratio non-path.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
4756895 to
392d6b7
Compare
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
Hi @jundot — friendly ping on this PR. It is rebased onto current main; the last CI run was 16643 passed / 1405 skipped / 1 failed, and that failure is a two-process cluster transport timeout in a file this PR does not touch (details in the thread). Happy to rebase again or reshape anything if that helps get it reviewed. |
|
closing for inactivity, no maintainer review after 78 days and one ping, rebased and green at close, will reopen on request |
Summary
Expose requested versus effective DFlash state through the existing authenticated
GET /v1/models/statusresponse.DFlash intentionally fails soft: when startup fails, oMLX serves the model through its natural batched/VLM engine and still returns
200. It can also switch permanently to that inner fallback after a successful load for long-context or multimodal requests. Until now an API client could not distinguish either fallback from an active DFlash engine.Each model status row now adds:
effective_engine: the backend serving the model nowdflash_requested: whether DFlash was requested for this loaddflash_active: whether DFlash is currently servingdflash_fallback_reason: a bounded, path-redacted reason when requested DFlash is not activeNo endpoint, dependency, or fallback policy changes. Existing clients receive an additive payload, and normal fallback continues serving successfully.
Runtime state
The status follows both load-time and post-load behavior:
effective_engine=dflash,dflash_active=truedflash_active=false, reason populateddflash_active=false, trigger populatedDFlashEngineexposes read-only fallback state; the pool does not inspect private engine fields. Runtime fallback triggers must supply a reason, so a new trigger cannot silently omit observability.Privacy and bounds
Fallback text crosses an API boundary. It is therefore whitespace-collapsed, filesystem paths are replaced with
<path>, and output is limited to 200 characters. Static reasons are used where possible; stack traces are not exposed.Example fallback:
{ "id": "Qwen3.8-27B", "loaded": true, "engine_type": "batched", "effective_engine": "batched", "dflash_requested": true, "dflash_active": false, "dflash_fallback_reason": "DFlash runtime fallback: prompt of 14000 tokens reached the DFlash context limit of 8192" }Client assertion:
Verification
On macOS / Python 3.13:
dflash.pyand the changed DFlash testsThe remaining whole-file ruff findings in
engine_pool.pyreproduce on upstream code and were deliberately not expanded into this PR.Closes #2896.